<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>音乐分享管理系统</title>

    <!-- Bootstrap core CSS -->
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="assets/css/offcanvas.css" rel="stylesheet">
    <link href="assets/css/style.css" rel="stylesheet">
    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]>
    <script src="assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="assets/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<?php 
//require_once('tpl/head.php');
 ?>
<nav class="navbar navbar-fixed-top navbar-inverse">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
     
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav">
        <li><a href="index.php">首页</a></li>
                                
                <li><a href="index.php?c=index&m=lists&tid=1">热门</a></li>
                                
                <li><a href="index.php?c=index&m=lists&tid=2">专辑</a></li>
                                
                <li><a href="index.php?c=index&m=lists&tid=3">艺人</a></li>
                                
                <li><a href="index.php?c=index&m=lists&tid=4">风格</a></li>
                                
                <li><a href="index.php?c=index&m=lists&tid=5">猜你喜欢</a></li>
                                
                
                          
          </ul>
        </li>
      </ul>

        <form action="search.php"class="navbar-form navbar-left" role="search" >
        <div class="form-group">
 
        <input type="text" class="form-control" name="musicname" placeholder="Search">
        </div>

        <button type="submit" class="btn btn-default">搜索</button>
        </form>

        <ul class="nav navbar-nav navbar-right">
        <li class="active"><a href="">欢迎<?php
        session_start();
        if(isset($_SESSION["user"]))
        echo " ".$_SESSION["user"]." ";
        else{

        echo "您";
        }
        ?>访问本网站</a>
        </li>

        <?php
        //登录成功才显示
        if(isset($_SESSION["user"]))
        {
        ?>
        <li><a href="logout.php">注销</a></li>
        <li class="dropdown">
        <a
        href="#"
        class="dropdown-toggle"
        data-toggle="dropdown"
        role="button"
        aria-haspopup="true" aria-expanded="false">个人中心  <span class="caret"></span></a>
        <ul class="dropdown-menu">
        <li><a href="#" data-toggle="modal" data-target="#changePassword">修改个人密
        码</a></li>
        <li><a href="#" data-toggle="modal"  data-target="#changeInfor">修改个 人信息
        </a></li>
        <li><a href="myCommentList.php" >我的评价</a></li>
        </ul>
        </li>
        
        <?php
        }else{
        ?>
   
        <li><a href="#" data-toggle="modal" data-target="#login">登录</a></li>
        <li><a href="#" data-toggle="modal" data-target="#reg">注册</a></li>
        <?php
        }
        ?>
        </ul>

          
      
    
     
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>

<!-- /.navbar -->


<div class="container">
<!--幻灯片开始-->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner">
        <div class="item active">
            <img src="assets/images/img4.jpg" class="img-responsive">
        </div>
        <div class="item">
            <img src="assets/images/img2.jpg" class="img-responsive" >          
        </div>
        <div class="item">
            <img src="assets/images/img3.jpg" class="img-responsive" >
        </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
    </a>
</div>
<!--幻灯片结束-->



    <div class="row row-offcanvas row-offcanvas-right">

        <div class="col-xs-12 col-sm-9">


            <div class="row text-center">


                    <div class="col-xs-12 col-lg-12 mlist">
                    <h2>热门</h2>
                    <ul class="list-inline row text-center">
                    <?php
                    foreach($data['musics1'] as $row1){                                   
                     
                    ?>
                    <li class="col-xs-4 col-sm-3 col-lg-2">
                    <img src="upload/<?php echo $row1["pic"]; ?>" class="responsive img-thumbnail" />
                   
                    <p><a href="index.php?c=index&m=content&vid=<?php
                    echo $row1["vid"];
                    ?>"><?php
                    echo $row1["musicname"];
                    ?></a>
                    </p>
                    </li>
                    <?php
                    }
                    ?>
                    </ul>
                    <p><a class="btn btn-default" href="list.php?tid=<?php
                    echo $tid1;
                    ?>" role="button">更多 &raquo;</a></p>
                    </div>




                    <div class="col-xs-12 col-lg-12 mlist">
                    <h2>专辑</h2>
                    <ul class="list-inline row text-center">
                    <?php
                    foreach($data['musics2'] as $row1){                                   
                     
                    ?>
                    <li class="col-xs-4 col-sm-3 col-lg-2">
                    <img src="upload/<?php echo $row1["pic"]; ?>" class="responsive img-thumbnail" />
                   
                    <p><a href="index.php?c=index&m=content&vid=<?php
                    echo $row1["vid"];
                    ?>"><?php
                    echo $row1["musicname"];
                    ?></a>
                    </p>
                    </li>
                    <?php
                    }
                    ?>
                    </ul>
                    <p><a class="btn btn-default" href="list.php?tid=<?php
                    echo $tid1;
                    ?>" role="button">更多 &raquo;</a></p>
                    </div>



                    <div class="col-xs-12 col-lg-12 mlist">
                    <h2>艺人</h2>
                    <ul class="list-inline row text-center">
                    <?php
                    foreach($data['musics3'] as $row1){                                   
                     
                    ?>
                    <li class="col-xs-4 col-sm-3 col-lg-2">
                    <img src="upload/<?php echo $row1["pic"]; ?>" class="responsive img-thumbnail" />
                   
                    <p><a href="index.php?c=index&m=content&vid=<?php
                    echo $row1["vid"];
                    ?>"><?php
                    echo $row1["musicname"];
                    ?></a>
                    </p>
                    </li>
                    <?php
                    }
                    ?>
                    </ul>
                    <p><a class="btn btn-default" href="list.php?tid=<?php
                    echo $tid1;
                    ?>" role="button">更多 &raquo;</a></p>
                    </div>




                    <div class="col-xs-12 col-lg-12 mlist">
                    <h2>风格</h2>
                    <ul class="list-inline row text-center">
                    <?php
                    foreach($data['musics4'] as $row1){                                   
                     
                    ?>
                    <li class="col-xs-4 col-sm-3 col-lg-2">
                    <img src="upload/<?php echo $row1["pic"]; ?>" class="responsive img-thumbnail" />
                   
                    <p><a href="index.php?c=index&m=content&vid=<?php
                    echo $row1["vid"];
                    ?>"><?php
                    echo $row1["musicname"];
                    ?></a>
                    </p>
                    </li>
                    <?php
                    }
                    ?>
                    </ul>
                    <p><a class="btn btn-default" href="list.php?tid=<?php
                    echo $tid1;
                    ?>" role="button">更多 &raquo;</a></p>
                    </div>




                    <div class="col-xs-12 col-lg-12 mlist">
                    <h2>猜你喜欢</h2>
                    <ul class="list-inline row text-center">
                    <?php
                    foreach($data['musics4'] as $row1){                                   
                     
                    ?>
                    <li class="col-xs-4 col-sm-3 col-lg-2">
                    <img src="upload/<?php echo $row1["pic"]; ?>" class="responsive img-thumbnail" />
                   
                    <p><a href="index.php?c=index&m=content&vid=<?php
                    echo $row1["vid"];
                    ?>"><?php
                    echo $row1["musicname"];
                    ?></a>
                    </p>
                    </li>
                    <?php
                    }
                    ?>
                    </ul>
                    <p><a class="btn btn-default" href="list.php?tid=<?php
                    echo $tid1;
                    ?>" role="button">更多 &raquo;</a></p>
                    </div>
            </div>

        </div>
        <!--/.col-xs-6.col-lg-4-->

 
        <!--/.col-xs-12.col-sm-9-->

        <div class="col-xs-6 col-sm-3 sidebar-offcanvas" id="sidebar">

        
            <div class="list-group text-center">
                <h2 style="color:white;" >官方音乐榜</h2>
                <ul class="list-inline row text-center">
                <?php
                foreach($data['Tophit'] as $row5){
                ?>
                <li class="col-xs-12 col-lg-6">
                <img src="upload/<?php
                echo $row5["pic"];
                ?>" class="responsive img-thumbnail" />            
                <p><a href="index.php?c=index&m=content&vid=<?php
                echo $row5["vid"];
                ?>"><?php
                //显示视频名称中的前 5个字符
                echo mb_substr($row5["musicname"],0,6,'utf-8');
                ?></a>
                </p>
                </li>
                <?php
                }
                ?>
                </ul>
            </div>

         
            <div class="list-group text-center">
                <h2 style="color:white;" >网络热歌榜</h2>
                <ul class="list-inline row text-center">
                <?php
                foreach($data['Topdown'] as $row6){
                ?>
                <li class="col-xs-12 col-lg-6">
                <img src="upload/<?php
                echo $row6["pic"];
                ?>" class="responsive img-thumbnail" />            
                <p><a href="index.php?c=index&m=content&?vid=<?php
                echo $row6["vid"];
                ?>"><?php
                //显示视频名称中的前 5个字符
                echo mb_substr($row6["musicname"],0,6,'utf-8');
                ?></a>
                </p>
                </li>
                <?php
                }
                ?>
                </ul>
            </div>

        </div>



       








        <!--/.sidebar-offcanvas-->
    </div>
    <!--/row-->

   

</div>
<!--/.container-->
 <hr>

    <footer>
        <p>&copy; Company 2014</p>
    </footer>

    <?php 
    require_once('tpl/foot.php');

     ?>

<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->


</body>
</html>

